<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<%@ include file="Include.jsp" %>

<script type="text/javascript">
	
	$(document).ready(function() {
			
	});
	
</script>
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal"
		aria-hidden="true">x</button>
	<h3 id="myModalLabel"><s:message code="contactForm.addheader" /></h3>
</div>
<div class="modal-body">
<form:form class="form-horizontal" method="post" name="contactAddressForm" id="contactAddressForm" commandName="contactAddressForm" modelAttribute="contactAddressForm">
	<form:hidden path="contactid" id="contactid" />
	<table class="table table-bordered">
			<tr>
				<th ><form:label path="ctcperson">Contact Person</form:label></th>
				<td colspan="3">
					<form:input path="ctcperson" cssClass="input-xlarge" id="ctcperson" maxlength="30" size="20" tabindex="1" />
					<form:errors cssClass="text-error" path="ctcperson" />
				</td>
			</tr>
			<tr>
				<th ><form:label path="address">Address</form:label></th>
				<td colspan="3">
					<form:textarea path="address" rows="4" id="address" cssClass="input-xlarge" />
					<form:errors cssClass="text-error" path="address" />
				</td>
			</tr>
			<tr>
				<th><form:label path="countryid"><s:message code="app.country" /></form:label></th>
				<td colspan="3">
					<form:select path="countryid" cssClass="input-medium" id="countryid" onchange="renderDependentCombo(this.value,'GetStateListForCountry','stateid','');" tabindex="3">
						<form:option value="">--SELECT-</form:option>
						<form:options items="${countryMasterList}" itemLabel="countryname" itemValue="countryid"/>
					</form:select>
					<form:errors cssClass="text-error" path="countryid" />
				</td>
			</tr>
			<tr>
				<th ><form:label path="stateid"><s:message code="app.state" /></form:label></th>
				<td >
					<form:select path="stateid" tabindex="4" cssClass="input-medium" id="stateid" onchange="renderDependentCombo(this.value,'GetCityListForState','cityid','');">
						<form:option value="">--SELECT-</form:option>
					</form:select>
					<form:errors cssClass="text-error" path="stateid" />
				</td>
				<th ><form:label path="cityid"><s:message code="app.city" /></form:label></th>
				<td >
					<form:select path="cityid" cssClass="input-medium" id="cityid" tabindex="5">
						<form:option value="">--SELECT-</form:option>
					</form:select>
					<form:errors cssClass="text-error" path="cityid" />
				</td>
			</tr>
			<tr>
				<th><form:label path="cellno" id="cellnolable">Cell No</form:label></th>
				<td>
					<form:input path="cellno" cssClass="input-medium" id="cellno" maxlength="12" size="12" />
	 				<form:errors cssClass="text-error" path="cellno" />
				</td>
				<th><form:label path="teleno" id="cellnolable">Tell No</form:label></th>
				<td>
					<form:input path="teleno" cssClass="input-medium" id="teleno" maxlength="12" size="12" />
	 				<form:errors cssClass="text-error" path="teleno" />
				</td>
			</tr>
			<tr>
				<th><form:label path="faxno" id="cellnolable">FAX No</form:label></th>
				<td colspan="3">
					<form:input path="faxno" cssClass="input-medium" id="faxno" maxlength="12" size="12" />
	 				<form:errors cssClass="text-error" path="faxno" />
				</td>
			</tr>			
	</table>
	<br>
	<button class="btn btn-primary" type="submit" formaction="AddContactAddress">
		<s:message code="app.add" />
	</button>
	<button class="btn" type="submit" formaction="ListContact" form="cancelForm" formmethod="get">
		<s:message code="app.cancel" />
	</button>
</form:form>
</div>